﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using Microsoft.Practices.Composite.UnityExtensions;
using Microsoft.Practices.Composite.Modularity;
using OrderEntryManagement.Modules.OrderEntry;
using Microsoft.Practices.Composite.Events;
using Microsoft.Practices.Unity;
using OrderEntryManagement.Controls;
using OrderEntryManagement.Modules.Customer;

namespace OrderEntryManagement
{
    public class Bootstrapper : UnityBootstrapper
    {
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();
        }

        protected override DependencyObject CreateShell()
        {
            IEventAggregator eventAggregator = base.Container.Resolve<IEventAggregator>();
            Shell shell = new Shell(eventAggregator);
            Application.Current.RootVisual = shell;
            return shell;
        }

        protected override IModuleCatalog CreateModuleCatalog()
        {
            var catalog = new ModuleCatalog();
            catalog.AddModule(typeof(OrderEntryModule));
            catalog.AddModule(typeof(CustomerModule));

            return catalog;
        }
    }
}
